package main

import "sort"

func main() {

}

type pair struct {
	x, y int
}

func kthSmallestPrimeFraction(arr []int, k int) []int {
	n := len(arr)
	tmp := make([]pair, 0, n*(n-1)/2)
	for i := range arr {
		for j := i + 1; j < n; j++ {
			tmp = append(tmp, pair{x: arr[i], y: arr[j]})
		}
	}
	sort.Slice(tmp, func(i, j int) bool {
		return tmp[i].x*tmp[j].y < tmp[j].x*tmp[i].y
	})

	return []int{tmp[k-1].x, tmp[k-1].y}
}
